package jrain.fw.core.dao;

import java.util.List;
import java.util.Map;

import jrain.fw.core.dao.bean.PageObj;
import jrain.fw.core.dao.bean.SqlInfo;

/**
 * <pre>
 * 作者：489088214@qq.com 
 * 描述： SQL执行器
 * </pre>
 */
public interface SqlRunner {

	public int insert(String namespace, String statement, Map<String, Object> paramData);

	public int update(String namespace, String statement, Map<String, Object> paramData);

	public int delete(String namespace, String statement, Map<String, Object> paramData);

	public int execSql(SqlInfo sqlObj, Map<String, Object> paramData);

	public int execSql(Map<String, Object> paramData, String sql, Object... params);

	public Map<String, Object> query(String namespace, String statement, Map<String, Object> paramData);
	
	public Map<String, Object> query(SqlInfo sqlObj, Map<String, Object> paramData);

	public int queryCount(String namespace, String statement, Map<String, Object> paramData);

	public Map<String, Object> queryBySql(Map<String, Object> paramData, String sql, Object... params);

	public Map<String, Object> queryBySql(Map<String, Object> paramData, Map<String, Object> mapper, String sql,
			Object... params);

	public List<Map<String, Object>> list(String namespace, String statement, Map<String, Object> paramData);

	public List<Map<String, Object>> list(SqlInfo sqlObj, Map<String, Object> paramData);

	public List<Map<String, Object>> listBySql(Map<String, Object> paramData, String sql, Object... params);

	public List<Map<String, Object>> listBySql(Map<String, Object> paramData, Map<String, Object> mapper, String sql,
			Object... params);

	public PageObj<List<Map<String, Object>>> listPage(String namespace, String statement,
			Map<String, Object> paramData);

	public PageObj<List<Map<String, Object>>> listPage(SqlInfo sqlObj, Map<String, Object> paramData);

	public PageObj<List<Map<String, Object>>> listPageBySql(Map<String, Object> paramData, String sql, long startRow,
			int pageSize, Object... params);

	public PageObj<List<Map<String, Object>>> listPageBySql(Map<String, Object> paramData, Map<String, Object> mapper,
			String sql, long startRow, int pageSize, Object... params);
}
